package GUI;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import csv.Export;
public class baobiao {
    private JPanel panel1;
    private JButton 会员卡充值Button;
    private JButton 新会员注册Button;
    private JButton 查询修改会员信息Button;
    private JButton 更改系统密码Button;
    private JButton 查询消费记录Button;
    private JButton 会员卡汇总记录Button;
    private JButton 使用会员卡Button;
    private JButton 消费记录报表Button;
    private JButton 获取报表Button;
    private JButton 报表导出Button;

    public static void iface() {
        JFrame frame = new JFrame("游泳馆会员管理系统");
        frame.setSize(500, 400);
        frame.setLocation(400, 200);

        baobiao t1 = new baobiao();
        frame.add(t1.panel1);

        frame.setVisible(true);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }

    public baobiao() {

        会员卡充值Button.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                new recharge().iface();
            }
        });
        查询消费记录Button.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                new consume().iface();
            }
        });
        查询修改会员信息Button.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                new revise().iface();
            }
        });
        更改系统密码Button.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                new password().iface();
            }
        });
        新会员注册Button.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                new VIP().iface();
            }
        });
        会员卡汇总记录Button.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                new totalVIP().iface();
            }
        });
        使用会员卡Button.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                new usecard().iface();
            }
        });
        消费记录报表Button.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                new baobiao().iface();
            }
        });
        获取报表Button.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                Export ex=new Export();
                ex.exportToCsv();
            }
        });

    }
    public static void main(String[] args) {
        iface();
    }


}
